-- UNITDEF -- pawnclose_vi --
--------------------------------------------------------------------------------

local unitName = "pawnclose_vi"

--------------------------------------------------------------------------------

local unitDef = {
  acceleration       = 0.75,
  brakeRate          = 0.75,
  buildCostMetal     = 10,
  canAttack          = true,
  canMove            = true,
  canstop            = 1,
  category           = [[PAWN UNARMORED UNIT TARGET]],
  collisionvolumetest = 1,
  corpse              = [[DEAD]],
  description        = [[Assault Lv 6]],
  energyMake         = 0,
  energyStorage      = 0,
  explodeAs          = [[Death]],
  footprintX         = 2,
  footprintZ         = 2,
  iconType           = [[PAWN]],
  idleAutoHeal       = 10,
  idleTime           = 300,
  levelGround        = false,
  maxDamage          = 1519, 
  maxVelocity        = 2,	--1.5
  metalMake          = 0,
  metalStorage       = 0,
  movementClass      = [[medium]],
  name               = [[Advanced Oni Armor]],
  noChaseCategory    = [[NOTARGET AIR]],
  objectName         = [[pawnclose_vi.s3o]],
  radarDistance      = 0,
  reclaimable        = false,
  scale 			 = 1.2;
  seismicSignature   = 1,
  selfDestructAs     = [[Death]],
  selfDestructCountdown = 1,
  showNanoFrame      = false,
  sightDistance      = 800,
  smoothAnim         = false,
  turnRate           = 500,
  unitname           = [[pawnclose_vi]],
  upright            = true,
  sfxtypes = {
    explosiongenerators = {
[[custom:flashmuzzle1]],
[[custom:missileshot]],
[[custom:burning]],
    },
  },
  -- sounds = {
    -- arrived = {
      -- [[commandgiven]],
    -- },
    -- ok = {
      -- [[commandgiven]],
    -- },
    -- select = {
      -- [[select]],
    -- },
  -- },
  weapons = {
    [1]  = {
      def                = [[cviwep1]],
      onlyTargetCategory = [[TARGET]],
	  badtargetcategory  = [[NOTARGET]],
	  mainDir            = [[0 0 1]], --- wont read quotes
      maxAngleDif        = 170,
    },
	  [2]  = {
      def                = [[cviwep2]],
      onlyTargetCategory = [[TARGET]],
	  badtargetcategory  = [[NOTARGET]],
	  mainDir            = [[0 0 1]], --- wont read quotes
      maxAngleDif        = 170,
    },
  },
}


--------------------------------------------------------------------------------

local weaponDefs = {
    cviwep1 = {
	id                 = 6,
	avoidFriendly      = false,
    burst              = 3,
    burstrate          = .3,
    collideFriendly    = false,
    craterBoost        = 0,
    craterMult         = 0,
    duration           = .05,
    explosionGenerator = [[custom:none]],
    id                 = 1,
    impactonly         = 1,
    impulseBoost       = 0,
    impulseFactor      = 0,
    name               = [[Auto Cannon]],
    range              = 290,	--290
    reloadtime         = 3, --normal 3 but 1/2 damage
    rgbColor                = [[0.4 0.5 1]],
	texture1 = [[bullet]],
	texture2 = [[bullet]],
	texture3 = [[bullet]],
	size = 3;
    soundStart         = [[gunfire]],
    sprayAngle         = 200,
    thickness          = 4,
    tolerance          = 1000,
    turret             = true,
    weaponType         = [[LaserCannon]],
    weaponVelocity     = 1000,
	InterceptedByShieldType = 2,
    damage = {
      default            = 45.6, ---??
    },
  },
    cviwep2 = {
	name = [[Rocket Launcher]],
	id = 6,
	rendertype = 4,
	ballistic = 1,
	turret = 1,
	collideFriendly    = false, --for now
	energypershot = 0,
	range = 240,
	burst = 5,
	burstrate = 0.3,
	reloadtime = 3, 
	weaponvelocity = 900,
	areaofeffect = 20,
	edgeeffectiveness = 1,
	model = [[srocket.s3o]],
	soundstart = [[rockfire2]],
	soundhit = [[rockhit2]],
	firestarter = 50,
	accuracy = 300,
	aimrate = 1000,
	tolerance = 300,
	holdtime = 1,
	explosiongenerator = [[custom:SMALLMISSILE_EXPLOSION]],
	startsmoke = 1,
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	InterceptedByShieldType = 2,
    damage = {
      default            = 54,
    },
  },
  }
unitDef.weaponDefs = weaponDefs


local featureDefs = {
    DEAD  = {
      description      = [[Wreckage - pawn]],
      blocking         = true,
      category         = [[corpses]],
      damage           = 1000,
      energy           = 0,
	  featureDead      = [[HEAP]],
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 3,
      height           = [[20]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[pawnclose_v_dead.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      world            = [[All Worlds]],
    },
	
	 HEAP  = {
      description      = [[Debris - pawn]],
      blocking         = false,
      category         = [[heaps]],
      damage           = 500,
      energy           = 0,
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 3,
      height           = [[4]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[mech_heap.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      seqnamereclamate = [[TREE1RECLAMATE]],
      world            = [[All Worlds]],
    },
  }
  unitDef.featureDefs = featureDefs
  
--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
